package project;

import java.util.Scanner;

public class project_2 {
    public static void main(String[] args) {

        int num = (int) (Math.random() * 100) + 1;
        int count = 0;
        System.out.println("猜猜偶心里的数字是几");
        Scanner sc = new Scanner(System.in);
        while (true) {
            count++;
            System.out.print("应该是:");
            int a = sc.nextInt();
            if (a > num) {
                System.out.println("太大了:");
            } else if (a < num) {
                System.out.println("太小了");
            } else {
                System.out.println("你猜对了");
                break;
            }
        }
        System.out.println("总共猜了" + count + "次");
        if (count <= 5){
            System.out.println("你太聪明了");
        }else {
            System.out.println("你太菜了");
        }
    }
}
